<?php

class XSLT {


function Get($xmlText,$xslFile) {

    // Load the XML source
    $xml = new DOMDocument;
    $xml->loadXML($xmlText);

    // Configure the transformer
    $proc = new XSLTProcessor;
    $proc->importStyleSheet(DOMDocument::load($xslFile)); // attach the xsl rules

    $html = $proc->transformToDoc($xml);
    $html->formatOutput = true;
    return $html->saveXML();
   }

}


?>